home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / utils / pbmbat12 / readme < prev   
Text File  |  1994-09-10  |  7KB  |  196 lines

  1. PBMBAT 1.2 (September 10, 1994) -- README
  2.  
  3. ***************************************************************
  4.  
  5. TABLE OF CONTENTS
  6.  
  7. (1) WHAT IS PBMPLUS?
  8.  
  9. (2) PROBLEM (A): HOW TO FIND THE RIGHT CONVERTER?
  10.  
  11. (3) PROBLEM (B): CREATING AND DELETING PROGRAMS 
  12.  
  13. (4) THE PBMBAT PROGRAM
  14.  
  15. (5) WHAT'S NEW IN THIS VERSION?
  16.  
  17. ***************************************************************
  18.  
  19. (1) WHAT IS PBMPLUS?
  20.  
  21. Here is an excerpt from the original README file for PBMPLUS.
  22.  
  23. ***************************************************************
  24.  
  25. Extended Portable Bitmap Toolkit. Distribution of 10dec91.
  26. Previous distribution 30oct91.
  27.  
  28. PBMPLUS is a toolkit for converting various image formats to
  29. and from portable formats, and therefore to and from each
  30. other. The idea is, if you want to convert among N image
  31. formats, you only need 2*N conversion filters, instead of the
  32. N^2 you would need if you wrote each one separately.
  33.  
  34. In addition to the converters, the package includes some
  35. simple tools for manipulating the portable formats.
  36.  
  37. ***************************************************************
  38.  
  39. (2) PROBLEM (A): HOW TO FIND THE RIGHT CONVERTER?
  40.  
  41. Here is an excerpt from the original README file for PBMPLUS.
  42.  
  43. ***************************************************************
  44.  
  45. Some people get confused by all the different names. If you
  46. want to convert a pbm file to a Sun raster file, is it
  47. pbmtorast, pgmtorast, ppmtorast, or pnmtorast? In this case
  48. some of the confusion might be because previous versions of
  49. the package did in fact have both pbmtorast and ppmtorast. 
  50. But mostly it's just too many different things to hold in your
  51. short term memory. Fine, so don't even try to remember what's
  52. what. That's what computers are for. 
  53.  
  54. ***************************************************************
  55.  
  56. (3) PROBLEM (B): CREATING AND DELETING PROGRAMS 
  57.  
  58. Here is an excerpt from the original README.DOS file for Mike
  59. Castle's DOS port of PBMPLUS using the djgpp compiler
  60. (gcc/g++).
  61.  
  62. ***************************************************************
  63.  
  64. On unix systems, you can do what is called a 'link' to a file.
  65. Essentially what this does is gives the same file different
  66. names. When the file is an executable, the name returned by
  67. argv[0] is what ever name you invoked it by. Some programs can
  68. examine argv[0] and change their functionality as a result.
  69. compress/uncompress/zcat does this. All three programs are
  70. identical (and on many systems, the exact same file with
  71. multiple links). Pbmplus uses this functionality to make
  72. smaller 'merged' binaries. Instead of compiling each program
  73. with main(), each program in compiled with filename_main(). A
  74. dispatch program (the p?mmerge.c file) calls the appropriate
  75. filename_main() based on what is in argv[0]. The result is you
  76. get one binary, slightly bigger than any individual binaries,
  77. but smaller than all of them put together becuase you are only
  78. linking in one copy of fprintf(), one copy of fopen(), one
  79. copy of ppm_readfile(), etc.
  80.  
  81. Now, since dos does not support links in its filesystem, you
  82. have to result to copying to get the functionality of the
  83. programs.
  84.  
  85. For example, if you want to take a 24-bit Targa file and
  86. quantize it to an 8 bit gif file for viewing, you would do the
  87. following:
  88.  
  89. copy ppmmerge.exe tgatoppm.exe
  90.  
  91. copy ppmmerge.exe ppmqvga.exe
  92.  
  93. copy ppmmerge.exe ppmtogif.exe
  94.  
  95. tgatoppm my.tga | ppmqvga | ppmtogif > my.gif
  96.  
  97. Of course, if you use a certain utility a lot, you keep that
  98. one around. If you occasionally need a certain functionality,
  99. you can copy the merged binary to the appropriate name, use
  100. it, then delete it. If you want to keep the entire ppmplus
  101. package on line, I would recommend building it yourself. 
  102. Takes about 4 megs to keep all the stubbed exe's around. What
  103. I do is keep unmerged copies of the files I use all the time
  104. and the p?mmerge files. When I occasionally come across
  105. something I don't have, I can use the merged binary. You can
  106. usually figure out which merged binary to use by the name of
  107. the program you want. Any program that handles multiple p?m
  108. types will be in the higher ranking of the merged binaries.
  109. ie, pbmtopgm is in pgmmerge, pgmtoppm is in ppmmerge, etc
  110.  
  111. ****************************************************************
  112.  
  113. (4) THE PBMBAT PROGRAM
  114.  
  115. ****************************************************************
  116.  
  117. The PBMBAT program solves problems (A) and (B) for you by
  118. creating exactly the batch files you want.
  119.  
  120. EXAMPLE 1.
  121.  
  122. You want to convert the GIF file "image.gif" into the GEM file
  123. "image.img".
  124.  
  125. You type "pbmbat giftogem image.gif image.img > xx.bat"
  126.  
  127. This creates a batch file called xx.bat. Run this batch file
  128. and delete it, and your job will be done. That's all!
  129.  
  130. IMPORTANT NOTE
  131.  
  132. I always use the batch file pbm.bat to make this process
  133. even easier. Read pbm.bat in order to see what it does. Modify
  134. it if necessary.
  135.  
  136. When you use pbm.bat, you can simply type
  137. "pbm giftogem image.gif image.img"
  138.  
  139. EXAMPLE 2.
  140.  
  141. You want to make a pretty picture. Type:
  142.  
  143. call pbm ppmpat -squig 640 480 temp0
  144. call pbm ppmquant 128 temp0 temp1
  145. call pbm ppmtogif temp1 pretty.gif
  146. del temp0
  147. del temp1
  148.  
  149. (Or make a batch file which executes these commands for you.)
  150.  
  151. COMMAND SYNTAX:
  152.  
  153. USAGE: "pbmbat program [arguments] outputfile [>batchfile]"
  154.  
  155. INPUT: atk brush cmuwm fits fs g3 gem gif gould hips icon ilbm img lispm
  156.   macp mgr mtv pbm pcx pgm pi1 pi3 pict pj pnm ppm psid qrt rast raw
  157.   rgb3 sld spc spu tga xbm xim xpm xwd ybm yuv                    (N=41)
  158.  
  159. OUTPUT: 10x acad ascii atk bbnbg cmuwm epson fits fs g3 gem gif go icon
  160.   icr ilbm lispm lj macp mgr pbm pcx pgm pi1 pi3 pict pj plot pnm ppm ps
  161.   ptx puzz rast rgb3 sixel tga uil x10bm xbm xpm xwd ybm yuv zinc (N=45)
  162.  
  163. IMAGE GENERATORS: $crater $forge $make $pat $ramp $text $upc       (N=7)
  164.   where $ is a string from OUTPUT
  165.  
  166. FILTERS: pbmlife pbmmask pbmreduce pgmbentley pgmedge pgmenhance pgmhist
  167.   pgmnorm pgmoil pgmtexture pnmarith pnmcat pnmcomp pnmconvol pnmcrop
  168.   pnmcut pnmdepth pnmenlarge pnmfile pnmflip pnmgamma pnminvert pnmnoraw
  169.   pnmpaste pnmrotate pnmscale pnmshear pnmtile ppmdither ppmhist
  170.   ppmquant ppmqvga ppmrelief                                      (N=33)
  171.  
  172. EXAMPLES: pbmbat atkto10x pic.atk pic.10x
  173.           pbmbat giftext "<"text.txt text.gif
  174.  
  175. (Note the quotation marks around the redirection character!)
  176.  
  177. AUTHOR
  178.  
  179. (c) Gert-Jan C. Lokhorst,
  180. lokhorst@filint.fwb.eur.nl,
  181.  
  182. All comments are very welcome!
  183.  
  184. ****************************************************************
  185.  
  186. (5) WHAT'S NEW IN THIS VERSION?
  187.  
  188. ****************************************************************
  189.  
  190. VERSION 1.2
  191.  
  192. You can now convert any file in any drive:directory into a
  193. file in any other drive:directory from any drive:directory,
  194. provided that the PBMPATH environment variable has been set.
  195. pbm.bat shows how to do this.
  196.